package br.com.lambdacore.validator.impl;

import java.util.Map;

import br.com.lambdacore.validator.Validator;

public final class MapValidator extends Validator<Map<?, ?>> {

	protected MapValidator(Map<?, ?> map) {
		super(map);
	}

	public boolean empty() {
		return this.getObject().isEmpty();
	}

	public boolean notEmpty() {
		return !this.empty();
	}

	public boolean notNullOrEmpty() {
		return !this.nullOrEmpty();
	}

	public boolean nullOrEmpty() {
		return this.nil() || this.empty();
	}

	public static MapValidator is(Map<?, ?> map) {
		return new MapValidator(map);
	}

}
